import { http } from '@/utils/http'
// 引入ts类型
import type { goodsDetailType } from '@/types/goodsDetail'
enum API {
  GOODSDETAIL = '/goods',
}

// 根据id获取商品详情
export const getGoodsDetailByIdAPI = (id: string) => {
  return http<goodsDetailType>({
    method: 'GET',
    url: API.GOODSDETAIL,
    data: {
      id,
    },
  })
}
